package day_2022_12_to_3.year2023;

/**
 * @author haomin
 * @date 2023/01/30 14:27
 **/
public class Day1_29_Num2315 {
    class Solution {
        public int countAsterisks(String s) {
            int p = 0, ans = 0;
            for(char c : s.toCharArray()) {
                if(c == '|') p++;
                if((p & 1) == 0 && c == '*') ans++;
            }
            return ans;
        }
    }
}